home *** CD-ROM | disk | FTP | other *** search
/ Winzipper / Winzipper_ISO.iso / internet / net commander 1.0 / ISP / SCRPTLST / SHADOW.CMD < prev    next >
Encoding:
Text File  |  1996-03-01  |  2.2 KB  |  116 lines

  1. #    Shadow Information Services, Inc.
  2. # SHADOW login script for Trumpet Winsock 2.0 rev b
  3. # edited by: Jack Fetter
  4. #
  5. # NOTE: This script is SLIP only!!!
  6. #
  7. # set up some string variables for dialing up SHADOW host
  8. #
  9. if ![load $numbers]
  10.   if [query $numbers "Enter your dial up phone number..."]
  11.     save $numbers
  12.   end
  13. end
  14. if ![load $usernames]
  15.   if [usernames "Enter your login username..."]
  16.     save $usernames
  17.   end
  18. end
  19. if ![load $passwords]
  20.   if [passwords "Enter your login password..."]
  21.     save $passwords
  22.   end
  23. end
  24. $modemsetup = "&C1&D2S11=60"
  25. $prompt = "annex:"
  26. $userprompt = "Username:"
  27. $passprompt = "Password:"
  28. $slipcmd = "2"
  29. $addrtarg = "Your address is"
  30. #
  31. %attempts = 10
  32. #
  33. output "ATZ"\13
  34. if ! [input 10 OK\n]
  35.   display "Modem is not responding"\n
  36.   abort
  37. end
  38. #
  39. # setup our modem commands
  40. #
  41. output "AT"$modemsetup\13
  42. input 10 OK\n
  43. #
  44. # send phone number
  45. #
  46. %n = 0
  47. repeat
  48.   if %n = %attempts
  49.     display "Too many dial attempts"\n
  50.     abort
  51.   end
  52.   display " "\n
  53.   display "calling SHADOW host server..."\n
  54.   display " "\n
  55.   display "... login proces
  56. s may take up to 45 seconds..."\n
  57.   display " "\n
  58.   output "ATDT"$numbers\13
  59.   %ok = [input 30 CONNECT]
  60.   %n = %n + 1
  61. until %ok
  62. input 10 \n
  63. #
  64. #  wait till it's safe to send because some modem's hang up
  65. #  if you transmit during the connection phase
  66. #  <if problems auto-logging on, increase SLEEP time...>
  67. #
  68. sleep 5
  69. #
  70. # wait for the Annex: prompt
  71. #
  72. input 30 $prompt
  73. #
  74. # jump into slip mode
  75. #
  76. output $slipcmd\13
  77. #
  78. # wait for the username prompt
  79. #
  80. input 30 $userprompt
  81. output $usernames\13
  82. #
  83. # and the password
  84. #
  85. input 30 $passprompt
  86. output $passwords\13
  87. #
  88. # we are now logged in
  89. #
  90. # wait for the address string
  91. #
  92. input 30 $addrtarg
  93. #
  94. # parse address
  95. #
  96. address 15
  97. input 15 \n
  98. #
  99. # we are now connected, logged in and in slip mode.
  100. #
  101. display \n
  102. display "Connected... Your IP address is " \i\n
  103. #
  104. sleep 2
  105. display " "\n
  106. display "grabbing IP address for automated login... please wait..."\n
  107. #
  108. # sleep for 5 seconds then issue ESC character to kick into slip/ppp
  109. #
  110. sleep 5
  111. output \27
  112. end
  113. #
  114. # now we are finished...
  115. # SHADOW auto-logon for Trumpet WinSock 2.0b...
  116.